package org.vincen.helloworld.coding;

import org.apache.commons.lang3.StringUtils;

public class UUID {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		System.out.println(java.util.UUID.fromString("20130823_3304"));
//		System.out.println(java.util.UUID.fromString("西安经发置业有限公司 - 现场勘验笔录"));
		// java使用的UUID标准的UUID，格式：xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx (8-4-4-4-12)
		java.util.UUID uuid = java.util.UUID.randomUUID();
		System.out.println(uuid.toString());
		long ul = uuid.getLeastSignificantBits();
		long um = uuid.getMostSignificantBits();
//		System.out.println(ul);
//		System.out.println(um);
		String uuidStr = StringUtils.replace(uuid.toString(), "-", "");
		System.out.println(uuidStr);
	}

}
